<template>
  <div class="arrayUtil page-container">
    <h1 class="mini-margin">数组相关方法</h1>
    <h3 class="mini-margin"> 数组示例： {{ [100, 2, 10, 60, 80, 30, 30, 100] }}</h3>
    <a-button type="primary" class="mini-margin">
      数组求和 {{ ArrayUtil.arraySum([100, 2, 10, 60, 80, 30, 30, 100]) }} 
    </a-button>
    <a-button type="primary" class="mini-margin">
      数组去重{{ ArrayUtil.unique([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <a-button type="primary" class="mini-margin">
      冒泡排序{{ ArrayUtil.bubbleSort([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <a-button type="primary" class="mini-margin">
      快速排序{{ ArrayUtil.quickSort([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <a-button type="primary" class="mini-margin">
      插入排序{{ ArrayUtil.insertSort([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <a-button type="primary" class="mini-margin">
      选择排序{{ ArrayUtil.selectSort([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <a-button type="primary" class="mini-margin">
      isArray: {{ ArrayUtil.isArray([100, 2, 10, 60, 80, 30, 30, 100]) }}
    </a-button>
    <pre style="font-size: 16px;">
      <h2>   使用示例</h2>
      ArrayUtil.arraySum([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.unique([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.bubbleSort([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.quickSort([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.insertSort([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.selectSort([100, 2, 10, 60, 80, 30, 30, 100])
      ArrayUtil.isArray([100, 2, 10, 60, 80, 30, 30, 100])
    </pre>
  </div>
</template>

<script lang='ts' setup>
import { ArrayUtil } from '@/utils';
</script>

<style scoped lang='scss'>
  .arrayUtil{}
</style>